import { createStore } from 'redux'

const reducer = (state, action) => {
    const { type } = action;

    if(type === 'CHANGE_USER_INFO') {
        return {
            ...state,
            userInfo: action.data
        }
    } 
    
    return state
}

const initState = {
    userInfo: {}
}

const store = createStore(reducer, initState)

export default store

